﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Ditto.Models.UserRequests>" %>

<div>
<h3>Requests (<%: Model.Count().ToString() %>)</h3>
<% foreach (var request in Model)
   {%>
        <div class="summary">

        <div class="image" style="float:left">
            <a href="/Users/<%= request.RequestingUserID %>"><img class="resized" alt="<%= request.RequestingUserID  %>" src="/Content/<%= request.RequestingUserID  %>-small.jpg" /></a>
        </div>

        <div style="float:left">
        <%: request.RequestingUserID %>
            <div id="dialog_link" style="float:right;padding:0px;margin:0px">
               <% Html.RenderAction("FriendStatus", new { request.RequestingUserID }); %>
            </div>
        </div>


</div>
  <% } %>

        <% if (Model.Count() == 0) { %>
        <div class="summary">
           No friend requests currently
        </div>
        <% } %>
</div>

<script src="/Scripts/jquery.myimgscale-0.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("img.resized").scaleImage({
            parent: '.image',
            center: false,
            fade: 500
        });
    });
</script>